import fly from '@/api/request.js'
// import to from "@/api/to"

/*
	GET  会员列表信息
	RES:
	{
	  "data": [
	    {
	      "card": "dingxiaowei", 
	      "descri": "1号场地周二的18:00-20:00", 
	      "place_id": 1, 
	      "time_id": 1, 
	      "time_str": "18:00-20:00"
	    }, 
		...
	  ], 
	  "msg": "success", 
	  "status": 0
	} 
*/
export    function  getVip(name) {
	const url = '/get_vip?card_no=' + name;
	return fly.get(url);
}





/*
	POST  添加预约
	REQ:
	{
		"name":"liumao",
		"type":0,
		"vip_or_employee":"12333",
		"place_id":1,
		"time_id":1,
		"retinue_js":[
			{
				"name":"liumao1",
				"card":"1212121",
				"phone":"13179606010"
			}
		]
	}
*/
export  function confirm(params) {
	const url = '/confirm' ;
	return fly.post(url,params);
}



/*
	POST  删除预约
	REQ:
	 {"name":"liumao","vip_or_employee":"12333"}
	 
*/
export  function cancel(params) {
	const url = '/cancel' ;
	
	return fly.post(url,params);
	
}


/*
	POST  预约详情
	REQ:
	  {"vip_or_employee":"12333"} 
	 
*/
export  function get_order(params) {
	const url = '/get_order' ;
	
	return fly.post(url,params);
	
}
